package com.ruoyi.web.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.mapper.GuMrStockSnapshotMapper;
import com.ruoyi.web.domain.GuMrStockSnapshot;
import com.ruoyi.web.service.IGuMrStockSnapshotService;

/**
 * 股票实时快照Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-24
 */
@Service
public class GuMrStockSnapshotServiceImpl implements IGuMrStockSnapshotService 
{
    @Autowired
    private GuMrStockSnapshotMapper guMrStockSnapshotMapper;

    /**
     * 查询股票实时快照
     * 
     * @param id 股票实时快照主键
     * @return 股票实时快照
     */
    @Override
    public GuMrStockSnapshot selectGuMrStockSnapshotById(String id)
    {
        return guMrStockSnapshotMapper.selectGuMrStockSnapshotById(id);
    }

    /**
     * 查询股票实时快照列表
     * 
     * @param guMrStockSnapshot 股票实时快照
     * @return 股票实时快照
     */
    @Override
    public List<GuMrStockSnapshot> selectGuMrStockSnapshotList(GuMrStockSnapshot guMrStockSnapshot)
    {
        return guMrStockSnapshotMapper.selectGuMrStockSnapshotList(guMrStockSnapshot);
    }

    /**
     * 新增股票实时快照
     * 
     * @param guMrStockSnapshot 股票实时快照
     * @return 结果
     */
    @Override
    public int insertGuMrStockSnapshot(GuMrStockSnapshot guMrStockSnapshot)
    {
        guMrStockSnapshot.setCreateTime(DateUtils.getNowDate());
        return guMrStockSnapshotMapper.insertGuMrStockSnapshot(guMrStockSnapshot);
    }

    /**
     * 修改股票实时快照
     * 
     * @param guMrStockSnapshot 股票实时快照
     * @return 结果
     */
    @Override
    public int updateGuMrStockSnapshot(GuMrStockSnapshot guMrStockSnapshot)
    {
        guMrStockSnapshot.setUpdateTime(DateUtils.getNowDate());
        return guMrStockSnapshotMapper.updateGuMrStockSnapshot(guMrStockSnapshot);
    }

    /**
     * 批量删除股票实时快照
     * 
     * @param ids 需要删除的股票实时快照主键
     * @return 结果
     */
    @Override
    public int deleteGuMrStockSnapshotByIds(String[] ids)
    {
        return guMrStockSnapshotMapper.deleteGuMrStockSnapshotByIds(ids);
    }

    /**
     * 删除股票实时快照信息
     * 
     * @param id 股票实时快照主键
     * @return 结果
     */
    @Override
    public int deleteGuMrStockSnapshotById(String id)
    {
        return guMrStockSnapshotMapper.deleteGuMrStockSnapshotById(id);
    }
}
